
import request from '@/utils/request'
// data{
//   type:"",
//   energy:"delete",
//   data:{}
// }
const typeObj = {
  'powerType': '/electricPropety/',
  'siteType': '/stationCate/'
}

export function commonApi(data) {
  return request({
    url: '/common' + typeObj[data.type] + data.energy,
    method: 'post',
    data: data.data
  })
}

// 获取树形结构数据
export function treeData(data) {
  return request({
    url: '/enterprise/common/stationTree',
    method: 'post',
    data
  })
}
